package com.hsurosy.hsuchain.nft.api.notice.response;

import com.hsurosy.hsuchain.nft.base.response.BaseResponse;

/**
 * 通知响应类
 *
 * @Author Hsu琛君珩
 * @Date 2024-10-04 16:58
 * @Description
 * @Version: v1.0.0
 */
public class NoticeResponse extends BaseResponse {

    /**
     * 通知响应的构建器类
     */
    public static class Builder {

        private NoticeResponse response;

        /**
         * 构造方法，初始化通知响应对象
         */
        public Builder() {
            response = new NoticeResponse();
        }

        /**
         * 设置响应代码
         *
         * @param code 响应代码
         * @return 构建器对象
         */
        public Builder setCode(String code) {
            response.setResponseCode(code);
            return this;
        }

        /**
         * 设置响应消息
         *
         * @param message 响应消息
         * @return 构建器对象
         */
        public Builder setMessage(String message) {
            response.setResponseMessage(message);
            return this;
        }

        /**
         * 设置响应成功状态
         *
         * @param success 是否成功
         * @return 构建器对象
         */
        public Builder setSuccess(boolean success) {
            response.setSuccess(success);
            return this;
        }

        /**
         * 构建通知响应对象
         *
         * @return 构建好的通知响应对象
         */
        public NoticeResponse build() {
            return response;
        }
    }
}
